package com.mall.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;

import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author fire
 * @since 2020-04-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Product对象", description = "")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "商品类型")
    @TableField("typeId")
    private Integer typeId;

    @ApiModelProperty(value = "商品描述")
    private String description;

    private String supplier;

    @ApiModelProperty(value = "商品数量")
    private Integer count;

    @ApiModelProperty(value = "上架价格")
    @TableField("launchPrice")
    private BigDecimal launchPrice;

    @ApiModelProperty(value = "商品状态")
    private String status;

    @ApiModelProperty(value = "上架时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标记(0不删除，1删除）")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "商品图片路径")
    private String url;

    @ApiModelProperty(value = "商品评价分数")
    private Double score;

    @ApiModelProperty(value = "销量")
    private Integer sales;

}
